<style lang="less" scoped>
.panel {
  margin-bottom: 10px;
  &-title {
    display: flex;
    padding: 10px;
    border-bottom: 0.1px solid #eaeaea;
    background: white;

    &__label {
      flex: 1;
      font-size: 16px;
      align-items: center;
    }
  }
  &-content {
    margin-bottom: 10px;
    background: white;

    &__item {
      display: flex;
      padding: 10px 10px 0 10px;
      font-size: 14px;
      &-label {
        color: #666;
        width: 100px;
      }
      &-value {
        flex: 1;
        padding-left: 15px;
        color: #333;
      }
    }
  }
}
</style>

<template>
  <div class="panel">
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">宗地标识</div>
        <div class="panel-content__item-value">{{item.LandSign||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">宗地编号</div>
        <div class="panel-content__item-value">{{item.LandNo||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">宗地坐落</div>
        <div class="panel-content__item-value">{{item.Address||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">所在行政区</div>
        <div class="panel-content__item-value">{{item.AdministrativeArea||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地面积(公顷)</div>
        <div class="panel-content__item-value">{{item.Acreage||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地他项权利人证号</div>
        <div class="panel-content__item-value">{{item.ObligeeNo||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地使用权证号</div>
        <div class="panel-content__item-value">{{item.UsufructNo||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地抵押人名称</div>
        <div class="panel-content__item-value">{{item.MortgagorName&&item.MortgagorName.Name||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地抵押人性质</div>
        <div class="panel-content__item-value">{{item.MortgagorNature||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地抵押权人</div>
        <div class="panel-content__item-value">{{item.MortgagePeople&&item.MortgagePeople.Name||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">抵押土地用途</div>
        <div class="panel-content__item-value">{{item.MortgagePurpose||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">抵押面积(公顷)</div>
        <div class="panel-content__item-value">{{item.MortgageAcreage||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">评估金额(万元)</div>
        <div class="panel-content__item-value">{{item.AssessmentPrice||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">抵押金额(万元)</div>
        <div class="panel-content__item-value">{{item.MortgagePrice||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
    <!-- content -->
    <div class="panel-content">
      <div class="panel-content__item">
        <div class="panel-content__item-label">抵押土地权属性质与使用权类型</div>
        <div class="panel-content__item-value">{{item.NatureAndType||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地抵押登记起始时间</div>
        <div class="panel-content__item-value">{{item.OnBoardStartTime||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
      <div class="panel-content__item">
        <div class="panel-content__item-label">土地抵押登记结束时间</div>
        <div class="panel-content__item-value">{{item.OnBoardEndTime||'-'}}</div>
        <div class="panel-content__item-right"></div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {
      item: {}
    };
  },
  onLoad() {
    this.getInfos();
  },
  onUnload() {
    this.item = {};
  },
  methods: {
    async getInfos() {
      const url = '/xcx/getLandMortgageDetailById';
      const params = {
        lmId: this.$route.query.id
      };
      const res = await this.$http.get(url, params);
      if (res.status != 200) {
        wx.showToast({
          title: res.message || '获取失败！',
          icon: 'none',
          mask: true
        });
        return;
      }
      this.item = res.result;
    }
  }
};
</script>
